package com.c2rusthub.service.response;

/**
 * @ClassName StatusCodeEnum
 * @Description 自定义查询状态码
 * @Author zhaozhiju
 * @Date 2024/12/2 3:16 PM
 * @Version V1.0
 */
public enum StatusCodeEnum {
    /**
     * 请求成功
     */
    OK(2000, "OK"),
    FAIL(5000, "内部错误"),
    ARGS_ERROR(5101, "参数错误"),
    ARGS_NOT_EMPTY(5102, "参数不能为空"),
    TOKEN_NOT_EMPTY(5103, "TOKEN不能为空"),

    EMAIL_FORMAT_ERROR(5104, "Email格式不正确"),

    /**
     * 业务出错
     **/
    REQUEST_ERROR(6000, "xxxxx异常");

    private final Integer code;
    private final String message;

    StatusCodeEnum(Integer value, String message) {
        this.code = value;
        this.message = message;
    }

    public Integer code() {
        return this.code;
    }

    public String msg() {
        return this.message;
    }

}
